package com.bgIntlgn.client.entity.buy;

import java.util.Date;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 待外购的产品
 * 
 * @author yuhui
 * 
 */

@Table(name = "to_buy_productions", constrain = "")
public class ToBuyProduction implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('to_buy_productions_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key ")
	private Long id;

	@Field(name = "order_id", type = "int8 ", constrain = " not null references orders(id)  on update cascade on delete cascade")
	private Long orderId;

	@Field(name = "uid", type = "char(80)", constrain = " not null references element_subversions(uid) on update cascade ")
	private String uid;

	/**
	 * 待购总数量
	 */
	@Field(name = "total_quantity", type = "int", constrain = "not null default 0")
	private Integer totalQuantity;
	
	@Field(name = "deliver_date", type = "timestamp", constrain = "")
	private Date deliverDate;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public String getUid() {
		return this.uid.trim();
	}

	public void setUid(String uid) {
		this.uid = uid.trim();
	}

	public Integer getTotalQuantity() {
		return this.totalQuantity;
	}

	public void setTotalQuantity(Integer totalQuantity) {
		this.totalQuantity = totalQuantity;
	}
	
	public Date getDeliverDate() {
		return deliverDate;
	}

	public void setDeliverDate(Date deliverDate) {
		this.deliverDate = deliverDate;
	}

}
